package com.umerclass.ui.anmo.three.adapter;

import android.content.Context;
import android.widget.TextView;
import com.umerclass.R;
import com.umerclass.bean.anmo.YeJiBean;
import com.umerclass.frame.ui.recycleview.PullLoadMoreRecyclerView;
import com.umerclass.frame.ui.recycleview.adapter.RecyclerviewBasicPageAdapterTwo;
import com.umerclass.frame.ui.recycleview.base.ViewHolder;
import com.umerclass.frame.ui.recycleview.listener.DataStateListener;
import com.umerclass.frame.ui.recycleview.listener.OptListener;

public class YeJiAdapter extends RecyclerviewBasicPageAdapterTwo<YeJiBean> {

    private OptListener optListener;

    public YeJiAdapter(Context context, int layoutId) {
        super(context, layoutId);
    }

    public YeJiAdapter(Context context, int layoutId,
                       PullLoadMoreRecyclerView pullLoadMoreRecyclerView,
                       DataStateListener dataStateListener, OptListener optListener) {
        super(context, layoutId, pullLoadMoreRecyclerView, dataStateListener);
        this.optListener = optListener;
    }

    @Override
    public void convert(ViewHolder holder, YeJiBean bean, final int position) {

        TextView tv1 = holder.getView(R.id.tv1);
        TextView tv2 = holder.getView(R.id.tv2);
        TextView tv3 = holder.getView(R.id.tv3);
        tv1.setText("顾客购买收入 "+ bean.getDeviceNo());
        tv2.setText("激活时间: "+ bean.getCreateDate());
        tv3.setText("+ ¥"+bean.getPrice());
    }
}
